package com.ouc.service.impl;

import com.ouc.entity.Department;
import com.ouc.mapper.DepartmentMapper;
import com.ouc.service.DepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Name: DepartmentServiceImpl
 * @Description:
 * @Author: Mr.Tong
 */
@Service
public class DepartmentServiceImpl implements DepartmentService {

    @Autowired
    private DepartmentMapper departmentMapper;

    @Override
    public List<Department> getAllDepartment() {
        return departmentMapper.getAllDepartment();
    }

    @Override
    public Department getDepartmentById(Integer id) {
        return departmentMapper.getDepartmentById(id);
    }

    @Override
    public Boolean insertDepartment(Department department) {
        return departmentMapper.insertDepartment(department);
    }

    @Override
    public Boolean deleteDepartmentById(Integer id) {
        return departmentMapper.deleteDepartmentById(id);
    }

    @Override
    public Boolean updateDepartment(Department department) {
        return departmentMapper.updateDepartment(department);
    }
}
